package com.chem.lems.utils;


import com.chem.lems.constans.ResultCodeConstant;

/**
 * @author anjy
 * @DESCRIPTION 统一API响应结果封装
 */
public class ResultUtil {

    private int returnCode;//状态码

    private String returnMsg;//消息

    private Object data;//数据

    public ResultUtil() {

    }

    public ResultUtil(ResultCodeConstant returnCode, String returnMsg, Object data) {
        this.returnCode = returnCode.code();
        this.returnMsg = returnMsg;
        this.data = data;
    }

    public ResultUtil(ResultCodeConstant returnCode, String returnMsg) {
        this.returnCode = returnCode.code();
        this.returnMsg = returnMsg;
    }

    public void setCode(int code) {
        this.returnCode = code;
    }

    public void setReturnCode(ResultCodeConstant resultCode) {
        this.returnCode = resultCode.code();
    }

    public int getReturnCode() {
        return returnCode;
    }

    public String getReturnMsg() {
        return returnMsg;
    }

    public void setReturnMsg(String message) {
        this.returnMsg = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

}

